package cn.bdqn.layui.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/**")
                .addResourceLocations("classpath:/static/", "classpath:/templates/");
    }

    public void addViewControllers(ViewControllerRegistry registry) {
        //registry.addViewController("/userList").setViewName("/views/user/user/list");

//       registry.addViewController("/dologin").setViewName("views/user/login");
//        registry.addViewController("/error403.html").setViewName("views/user/error403.html");
    }
}
